﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MvcDemo.Control
{
    public abstract class MvcControlInputBuilder<TControl, TBuilder> : MvcControlBuilderBase<TControl, TBuilder>
        where TControl : MvcControlInput
        where TBuilder : MvcControlInputBuilder<TControl, TBuilder>
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="control"></param>
        protected MvcControlInputBuilder(TControl control)
            : base(control)
        {

        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="usingMode"></param>
        /// <returns></returns>
        public virtual TBuilder UsingMode(MvcControlUsingModes usingMode)
        {
            Control.UsingMode = usingMode;
            return this as TBuilder;
        }

        public virtual TBuilder LableText(string text)
        {
            Control.LableText = text;
            return this as TBuilder;
        }
    }
}